#ifndef MAINWINDOW_H_
#define MAINWINDOW_H_
#include "Language.h"

#include <QMainWindow>
#include <QSpinBox>
#include <QWizard>
#include <QLabel>
#include <QString>
#include <QWidget>
#include <QVBoxLayout>
#include <QTextStream>
#include <QMessageBox>
#include <QComboBox>
#include <QLCDNumber>
#include <QLineEdit>
#include <QIcon>
#include "Board.h"
#include "Arena.h"
#include "BattleGame.h"
#include "ToDoBoatList.h"
#include "TurnManager.h"
#include "InformationBox.h"
#include "NumberBoatPageWizard.h"

class MainWindow : public QMainWindow {
	Q_OBJECT

	public:
		MainWindow(QWidget *parent = 0);
		
	public slots:
		void winnerPlayer1();
		void winnerPlayer2();
		void setDimension(int);
	
	private slots:
		void reset();
		void setToDoBoatList(int);
		void setTurnManager(const QString&);
		void printHelp();
		void setNamePlayer1(const QString&);
		void setNamePlayer2(const QString&);
		void setNumberPage(int);
		void about();
		
	private:
		void getInformation();
		void generateToDoBoatList();
		void creaEtichetteGiocatori();
		void creaMenu();
		
		Board* boardPlayer1;
		Board* boardPlayer2;
		QLabel* help;
		QLabel* error;
		QGridLayout* vgl;
		QWidget* central;
		BattleGame* game;
		
		ToDoBoatList toDoBoatList1;
		ToDoBoatList toDoBoatList2;
		
		QWizard* wizard;
		QWizardPage* dimension;
		QWizardPage* turnRule;
		QWizardPage* namePlayer;
		NumberBoatPageWizard* wizardAircraftCarrier;
		NumberBoatPageWizard* wizardCruiser;
		NumberBoatPageWizard* wizardSubmarine;
		NumberBoatPageWizard* wizardDestroyer;
		NumberBoatPageWizard* wizardCorvette;
		
		TurnManager* turnManager;
		InformationBox* infoBox;
		
		QString* namePlayer1;
		QString* namePlayer2;
		QLabel* labelPlayer1;
		QLabel* labelPlayer2;
		
		QPixmap* leftImage;
		
		int lastNumberBoat;
		int numberPage;
		
		int* numBoat;
		
		int dim;
};

#endif
